package com.vcms.utility.loader.storage.factory.impl;

import com.vcms.entity.store.item.CashStoreItem;
import com.vcms.entity.store.item.DrinksStoreItem;
import com.vcms.exception.VMCSException;
import com.vcms.utility.Environment;
import com.vcms.utility.loader.storage.engine.StorageEngine;
import com.vcms.utility.loader.storage.engine.xml.impl.CashXmlStorageEngine;
import com.vcms.utility.loader.storage.engine.xml.impl.DrinkXmlStorageEngine;
import com.vcms.utility.loader.storage.factory.StorageFactory;

/**
 * @author robin.foe A0092657U
 * Factory concrete implementation
 */
public class XmlStorageFactory extends StorageFactory{
	
	@Override
	public StorageEngine<CashStoreItem> createCashStorageEngine() throws VMCSException {
		return new CashXmlStorageEngine(Environment.getCashXmlFile());
	}

	@Override
	public StorageEngine<DrinksStoreItem> createDrinkStorageEngine() throws VMCSException{
		return new DrinkXmlStorageEngine(Environment.getDrinkXmlFile());
	}

}
